import Vue from 'vue'
import Router from 'vue-router'
import Main from '../views/Main'
import Login from '../views/Login'
import User from '../views/user/User'
import Userinfo from '../views/user/Userinfo'
import NotFount from '../views/NotFount'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/Main',
      name: 'Main',
      component: Main,
      children: [
        {
          path: '/user/User/:id',
          name: 'User',
          props: true,
          component: User
        },
        {
          path: '/user/Userinfo',
          component: Userinfo
        }
      ]
    },
    {
      path: '/Login',
      name: 'Login',
      component: Login
    },
    {
      path: '*',
      component: NotFount
    }
  ]
})
